/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-03-24
 * Time: 18:06
 */
public class StrAddImpl implements StrAddInter{
    private String[] str;

    private String newString = "";

    public StrAddImpl(String[] str){
        this.str = str;
    }

    @Override
    public void strAdd() {
        for(String s:str){
            newString += s.substring(0,s.length())+"&&";
        }
        // 截取掉最后面的&&
        System.out.println(newString.substring(0,newString.length()-2));
    }
}
